import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['@/components/login'],resolve)
    },
    {
      path: '/',
      name: 'home',
      component: resolve => require(['@/components/home'],resolve),
      children: [
        {
          path: '/inforAdd',
          name: 'inforAdd',
          component: resolve => require(['@/components/inforAdd'],resolve)
        },
        {
          path: '/inforList',
          name: 'inforList',
          component: resolve => require(['@/components/inforList'],resolve)
        },
        {
          path: '/caseAdd',
          name: 'caseAdd',
          component: resolve => require(['@/components/caseAdd'],resolve)
        },
        {
          path: '/caseList',
          name: 'caseList',
          component: resolve => require(['@/components/caseList'],resolve)
        },
        {
          path: '/desigList',
          name: 'desigList',
          component: resolve => require(['@/components/desigList'],resolve)
        },
        {
          path: '/desigAdd',
          name: 'desigAdd',
          component: resolve => require(['@/components/desigAdd'],resolve)
        },
        {
          path: '/shopAdd',
          name: 'shopAdd',
          component: resolve => require(['@/components/shopAdd'],resolve)
        },
        {
          path: '/shopList',
          name: 'shopList',
          component: resolve => require(['@/components/shopList'],resolve)
        },
        {
          path: '/orderList',
          name: 'orderList',
          component: resolve => require(['@/components/orderList'],resolve)
        },
        {
          path: '/modifyPassword',
          name: 'modifyPassword',
          component: resolve => require(['@/components/modifyPassword'],resolve)
        }
      ]
    }
  ]
})
